/**
 * @brief define entries used to search
 * Note: The key values of all entries form a full order relationship
 * The class Entry is similar to std::pair
 * 
 * @tparam K key type
 * @tparam V value type
 */
template <typename K, typename V>
struct Entry {
	K key;
	V value;

	Entry(K k = K(), V v = V()): key(key), value(v) { }
	Entry(Entry<K, V> const &e): key(e.key), value(e.value) {}

	bool operator<(Entry<V, K> const &rhs) const {
		return key < rhs.key;
	}
	bool operator>(Entry<V, K> const &rhs) const {
		return rhs < *this;
	}
	bool operator==(Entry(V, K) const &rhs) const {
		return key == rhs.key;
	}
	bool operator!=(Entry(V, K) const &rhs) const {
		return !(*this == rhs);
	}
};